<template>
	<view class="flex-colume-start videoList">
		<view @click="videoDetailClick(item)" class="flex-row-start videoItem" v-for="(item,index) in dataArr" :key="index">
			<image mode="aspectFill" :src="item.thumb" class="leftImg"></image>
			<view class="flex-colume-start" style="height: 168rpx; align-items: flex-start;">
				<view class="text-one-line title1">{{item.name}}</view>
				<view class="text-three-line desc1">{{item.desc}}</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import {articleList} from '@/api/api.js'
	export default {
		data() {
			return {
				dataArr:[]
			}
		},
		onLoad(e){
			if (e.cateStr){
				var cateStr = decodeURIComponent(e.cateStr)
				this._cateModel = JSON.parse(cateStr)
			}
			this.requestList()
			
			
			
		},
		methods: {
			requestList(){
				articleList({category_name:this._cateModel.cate2}).then(res=>{
					if (res.code == 200){
						this.dataArr = res.data.list
					}
				})
				
			},
			videoDetailClick(item){
				uni.navigateTo({
					url:'/pages/index/newsDetail?id='+item.id
				})
			}
			
		}
	}
</script>
<style>
	page{
		background-color: white;
	}
</style>

<style lang="scss" scoped>
	.videoList{
		.videoItem{
			padding: 30rpx 10rpx;
			width: 690rpx;
			border-bottom: 1px solid rgb(230, 230, 230);
			.leftImg{
				width: 168rpx;
				height: 168rpx;
				border-radius: 10rpx;
				flex-shrink: 0;
				margin-right: 12rpx;
			}
			.title1{
				max-width: 490rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
				font-size: 28rpx;
				color: #38383A;
	
				
			}
			.desc1{
				max-width: 490rpx;
				margin-top: 12rpx;
				font-family: Source Han Sans CN;
				font-size: 25rpx;
				color: #949999;
				line-height: 32rpx;
				
			}
		}
	}

</style>
